package com.smartbone.entity;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * Band entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "band", catalog = "stockmaster", uniqueConstraints = @UniqueConstraint(columnNames = "stockId"))
public class Band implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 9023336027326876920L;
	private Long id;
	private Stockinfo stockinfo;
	private Timestamp startDate;
	private Float startPrice;
	private Timestamp endDate;
	private Float endPrice;
	private Integer dateNum;
	private Float bandPer;
	private Float tjPrice;
	private Float nowPrice;
	private Float priceDif;
	private Float tjAmount;
	private Float nowAmount;
	private Float amountDif;

	// Constructors

	/** default constructor */
	public Band() {
	}

	/** full constructor */
	public Band(Stockinfo stockinfo, Timestamp startDate, Float startPrice,
			Timestamp endDate, Float endPrice, Integer dateNum, Float bandPer,
			Float tjPrice, Float nowPrice, Float priceDif, Float tjAmount,
			Float nowAmount, Float amountDif) {
		this.stockinfo = stockinfo;
		this.startDate = startDate;
		this.startPrice = startPrice;
		this.endDate = endDate;
		this.endPrice = endPrice;
		this.dateNum = dateNum;
		this.bandPer = bandPer;
		this.tjPrice = tjPrice;
		this.nowPrice = nowPrice;
		this.priceDif = priceDif;
		this.tjAmount = tjAmount;
		this.nowAmount = nowAmount;
		this.amountDif = amountDif;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "stockId", unique = true, nullable = false)
	public Stockinfo getStockinfo() {
		return this.stockinfo;
	}

	public void setStockinfo(Stockinfo stockinfo) {
		this.stockinfo = stockinfo;
	}

	@Column(name = "startDate", nullable = false, length = 19)
	public Timestamp getStartDate() {
		return this.startDate;
	}

	public void setStartDate(Timestamp startDate) {
		this.startDate = startDate;
	}

	@Column(name = "startPrice", nullable = false, precision = 12, scale = 0)
	public Float getStartPrice() {
		return this.startPrice;
	}

	public void setStartPrice(Float startPrice) {
		this.startPrice = startPrice;
	}

	@Column(name = "endDate", nullable = false, length = 19)
	public Timestamp getEndDate() {
		return this.endDate;
	}

	public void setEndDate(Timestamp endDate) {
		this.endDate = endDate;
	}

	@Column(name = "endPrice", nullable = false, precision = 12, scale = 0)
	public Float getEndPrice() {
		return this.endPrice;
	}

	public void setEndPrice(Float endPrice) {
		this.endPrice = endPrice;
	}

	@Column(name = "dateNum", nullable = false)
	public Integer getDateNum() {
		return this.dateNum;
	}

	public void setDateNum(Integer dateNum) {
		this.dateNum = dateNum;
	}

	@Column(name = "bandPer", nullable = false, precision = 12, scale = 0)
	public Float getBandPer() {
		return this.bandPer;
	}

	public void setBandPer(Float bandPer) {
		this.bandPer = bandPer;
	}

	@Column(name = "tjPrice", nullable = false, precision = 12, scale = 0)
	public Float getTjPrice() {
		return this.tjPrice;
	}

	public void setTjPrice(Float tjPrice) {
		this.tjPrice = tjPrice;
	}

	@Column(name = "nowPrice", nullable = false, precision = 12, scale = 0)
	public Float getNowPrice() {
		return this.nowPrice;
	}

	public void setNowPrice(Float nowPrice) {
		this.nowPrice = nowPrice;
	}

	@Column(name = "priceDif", nullable = false, precision = 12, scale = 0)
	public Float getPriceDif() {
		return this.priceDif;
	}

	public void setPriceDif(Float priceDif) {
		this.priceDif = priceDif;
	}

	@Column(name = "tjAmount", nullable = false, precision = 12, scale = 0)
	public Float getTjAmount() {
		return this.tjAmount;
	}

	public void setTjAmount(Float tjAmount) {
		this.tjAmount = tjAmount;
	}

	@Column(name = "nowAmount", nullable = false, precision = 12, scale = 0)
	public Float getNowAmount() {
		return this.nowAmount;
	}

	public void setNowAmount(Float nowAmount) {
		this.nowAmount = nowAmount;
	}

	@Column(name = "amountDif", nullable = false, precision = 12, scale = 0)
	public Float getAmountDif() {
		return this.amountDif;
	}

	public void setAmountDif(Float amountDif) {
		this.amountDif = amountDif;
	}

}